BUG? moo1.2.4-core bites mootools-1.2.4.4-more

8 views
Skip to first unread message

hamburger

unread,
Jul 28, 2010, 6:17:10 AM7/28/10
to MooTools Users
Hello cracks,
i have a class witch work fine with mootools-1.2.4.-core. If I add
mootools-1.2.4.4-more i get an error message.
(here: var bits = type.match(match);

please look here: http://jsfiddle.net/2U3ma/1/

any idea for help? thanks in advance.

the error code in moo-1.2.4.4-more:
/*
---
script: Element.Delegation.js
description: Extends the Element native object to include the delegate
method for more efficient event management.
credits:
- "Event checking based on the work of Daniel Steigerwald. License:
MIT-style license. Copyright: Copyright (c) 2008 Daniel Steigerwald,
daniel.steigerwald.cz"
license: MIT-style license
authors:
- Aaron Newton
- Daniel Steigerwald

requires:
- core:1.2.4/Element.Event
- core:1.2.4/Selectors
- /MooTools.More

provides: [Element.Delegation]

...
*/

(function(addEvent, removeEvent){

var match = /(.*?):relay\(([^)]+)\)$/,
combinators = /[+>~\s]/,
splitType = function(type){
var bits = type.match(match);
return !bits ? {event: type} : {
event: bits[1],
selector: bits[2]
};
},
...


<script type="text/javascript" src="js/mootools-1.2.4-core-yc.js"></
script>
<script type="text/javascript" src="js/mootools-1.2.4.4-more.js"></
script>

Andrea Dessì

unread,
Jul 28, 2010, 6:37:18 AM7/28/10
to mootool...@googlegroups.com
Hi hamburger,

I've tried your example just now, 
and seems to work good.

with and without -more.

hamburger

unread,
Jul 28, 2010, 6:51:10 AM7/28/10
to MooTools Users
Hello Andrea,
you are right jsFiddle gives not an error-message. But if you try it
with moo-more and without you will see that the behavier of the star-
color is different.
without moo-more it will go back to the begining star with leaving the
star-area.
with you will get the error and the color do not go back to the
begining.

On 28 Jul., 12:37, Andrea Dessì <nkj...@gmail.com> wrote:
> Hi hamburger,
>
> I've tried your example just now,
> and seems to work good.
>
> with and without -more.
>
> --
> Andrea Dessì
>
> Email: nkj...@gmail.com
> Skype: nkjoep
> Blog:http://www.stealthefish.com/
> LinkedIn:http://www.linkedin.com/in/andreadessi
> Jabber: nkj...@gmail.com
> Twitter:http://www.twitter.com/NKjoep
>

אריה גלזר

unread,
Jul 28, 2010, 7:36:48 AM7/28/10
to mootool...@googlegroups.com


On Wed, Jul 28, 2010 at 1:51 PM, hamburger <bili...@web.de> wrote:
you are right jsFiddle gives not an error-message. But if you try it
with moo-more and without you will see that the behavier of the star-
color is different.
without moo-more it will go back to the begining star with leaving the
star-area.
with you will get the error and the color do not go back to the
begining.

not sure what you are describing but for me they function exactly the same

--
Arieh Glazer
אריה גלזר
052-5348-561
5561

hamburger

unread,
Jul 28, 2010, 7:49:07 AM7/28/10
to MooTools Users
i'am using firefox 3.6.8 and ie7
the mouse-over-stars are not swinging back to there origin with moo-
more.
please deselect moo-more and than press run again

On 28 Jul., 13:36, אריה גלזר <arieh.gla...@gmail.com> wrote:

Paul Saukas

unread,
Jul 28, 2010, 10:13:56 AM7/28/10
to mootool...@googlegroups.com
type.match is not a function

http://fiddle.jshell.net/js/lib/mootools-1.2.4.4-more.js Line 1974

That would be your issue and it looks to be a problem in More 1.2.4 as the 1.2.3 More works just fine. I'd say file a bug report https://mootools.lighthouseapp.com/dashboard.

And for ref Firebug does catch errors from jsfiddle. :)

hamburger

unread,
Jul 28, 2010, 10:39:20 AM7/28/10
to MooTools Users
Hello Paul,
you are right. With 1.2.3 more it works. I have the same experience.

but i'am not well proven in moo to open a ticket. i'am sure its still
done.



On 28 Jul., 16:13, Paul Saukas <arasoihe...@gmail.com> wrote:
> type.match is not a function
>
> http://fiddle.jshell.net/js/lib/mootools-1.2.4.4-more.jsLine 1974
>
> That would be your issue and it looks to be a problem in More 1.2.4 as the
> 1.2.3 More works just fine. I'd say file a bug reporthttps://mootools.lighthouseapp.com/dashboard.
>
> And for ref Firebug does catch errors from jsfiddle. :)
>

Paul Saukas

unread,
Jul 28, 2010, 12:01:10 PM7/28/10
to mootool...@googlegroups.com
Hamburger,

Paul Saukas

unread,
Jul 28, 2010, 12:02:47 PM7/28/10
to mootool...@googlegroups.com
Sigh tab does not work to indent in a browser ....

    Did some more digging and found the error to be in your code not more.  you where not passing the event type to be removed from el.mouseCrap . I fixed it in this fiddle and all work fine now http://jsfiddle.net/2U3ma/4/

Aaron Newton

unread,
Jul 28, 2010, 1:46:20 PM7/28/10
to mootool...@googlegroups.com
1)

el.textEl = el.getElement('.ratingText');

Storing properties directly on elements is a very bad practice. Use element storage (el.store('property', value)). 

2) when I click on a star (firefox) The error I get is that text is undefined in this line:


3) the error you are getting is because you are passing a function to element.removeEvent, and you must pass both a function AND the event type:

el.removeEvent(el.mouseCrap);

should be

el.removeEvent('mousemove', el.mouseCrap);

hamburger

unread,
Aug 2, 2010, 7:05:36 AM8/2/10
to MooTools Users
thx Aaron,
thats it ...
i'am happy to have this professional guys here!

On 28 Jul., 19:46, Aaron Newton <aa...@iminta.com> wrote:
> 1)
>
> el.textEl = el.getElement('.ratingText');
>
> Storing properties directly on elements is a very bad practice. Use element
> storage (el.store('property', value)).
>
> 2) when I click on a star (firefox) The error I get is that text is
> undefined in this line:
>
> error = text.split('ERROR:')[1];
>
> 3) the error you are getting is because you are passing a function to
> element.removeEvent, and you must pass both a function AND the event type:
>
> el.removeEvent(el.mouseCrap);
>
> should be
>
> el.removeEvent('mousemove', el.mouseCrap);
>
Reply all
Reply to author
Forward
0 new messages